package com.zj.student.demo.service.impl;

import com.zj.student.demo.entity.Student;
import com.zj.student.demo.repository.StudentRepository;
import com.zj.student.demo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentRepository repository;
    @Override
    public void save(Student o){
        repository.save(o);
    }
    @Override
    public List<Student> all(){
        return repository.findAll();
    }

}
